package com.cmc.cloud.cmclink.doc.api.document;

import com.cmc.cloud.cmclink.doc.api.document.rep.AttachmentBaseRespDto;
import com.cmc.cloud.cmclink.doc.api.document.rep.AttachmentTypeBaseDto;
import com.cmc.cloud.cmclink.doc.constant.DocApiConstants;
import com.cmes.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 附件模板查询
 *
 * @author lzp
 */
@FeignClient(name = DocApiConstants.NAME)
@Tag(name = "RPC - 服务 附件类型查询")
public interface AttachmentTypeBaseApi {

    String PREFIX = DocApiConstants.PREFIX + "/attachmentType";

    /**
     * 附件类型查询
     *
     * @param useModules
     * @param useFunctions
     * @return
     */
    @GetMapping(PREFIX + "/query/{useModules}/{useFunctions}")
    @Operation(summary = "附件类型查询")
    CommonResult<List<AttachmentTypeBaseDto>> queryAttachmentType(@PathVariable("useModules") String useModules, @PathVariable("useFunctions") String useFunctions);

    /**
     * 上传提单附件
     *
     * @param createReqVOList
     * @return
     */
    @PostMapping(PREFIX + "/uploadAttachment")
    @Operation(summary = "上传提单附件")
    CommonResult<Void> uploadAttachment(@RequestBody List<AttachmentBaseRespDto> createReqVOList);

}
